	//全角转为半角
	function convertToBJ(obj){ 
		var str=obj.value;
		var result="";
		for (var i = 0; i < str.length; i++)
		{
		if (str.charCodeAt(i)==12288)
		{
		result+= String.fromCharCode(str.charCodeAt(i)-12256);
		continue;
		}
		if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375)
		result+= String.fromCharCode(str.charCodeAt(i)-65248);
		else result+= String.fromCharCode(str.charCodeAt(i));
		} 
		obj.value=result;
	} 
	
	var Common = {
			
		/**
		 * 封装Jquery的Ajax
		 * @param url
		 * @param param 支持Json和字串拼接两种方式
		 * @param dataType
		 * @param callBack
		 */
		jsonAjax:function(url, param, dataType,callBack,synchronization){
			var ajaxParam = "";
			if(Common.isJson(param)){
				for(var key in param){
					ajaxParam += key + "=" + param[key] + "&";
				}
				ajaxParam = ajaxParam.substr(0,ajaxParam.length- 1);
			}else{
				ajaxParam = param;
			}
			if(synchronization != false){
				synchronization = true;
			}
			$.ajax({
				async: synchronization,
	            type: "POST",
	            url: url,
	            data: ajaxParam,
	            dataType: dataType,
	            cache : false,
	            success: callBack,
	            error: function() {
	            	layer.alert("服务中断，请联系技术人员！", {icon: 0});
	            }
	        });
		},
		/**
		 * 判断是否Json 是返回true,否则false
		 * @param obj
		 * @returns {Boolean}
		 */
		isJson:function(obj){
			var isjson = typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length
	        return isjson;
		}
	}